<%@ page contentType="text/html; charset=UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@taglib prefix="h" uri="/syzg-html"%>
<!DOCTYPE html>
<html>
	<head>
		<%@ include file="/base/jsp/common/CommonListTop.jsp"%>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<title>[新闻编辑-新闻列表]</title>
		<link href="${ctx}/base/css/base.css" rel="stylesheet" type="text/css" />
		<link href="${ctx}/base/css/common.css" rel="stylesheet" type="text/css" />
		<link href="${ctx}/base/css/${customTheme}.css" rel="stylesheet" type="text/css" />
		<script src="${ctx}/base/js/base.js" type="text/javascript"></script>
		<script src="${ctx}/base/js/common/FormFunction.js" type="text/javascript"></script>
		<script src="${ctx}/baseNew/plugins/jQuery/jQuery-2.2.0.min.js"></script>
		<link href="${ctx}/baseNew/bootstrap/css/bootstrap.min.css" rel="stylesheet">
		<script src="${ctx}/baseNew/bootstrap/js/bootstrap.js" type="text/javascript"></script>
    	<link href="${ctx}/baseNew/other/css/bootstrap-datetimepicker.min.css" rel="stylesheet" media="screen">
		<script src="${ctx}/baseNew/other/js/bootstrap-datetimepicker.js" type="text/javascript"></script>
		<script src="${ctx}/baseNew/other/js/locales/bootstrap-datetimepicker.zh-CN.js" type="text/javascript"></script>
		<link rel="stylesheet" href="${ctx}/baseNew/dist/css/AdminLTE.min.css">
  		<link rel="stylesheet" href="${ctx}/baseNew/dist/css/skins/_all-skins.min.css">
  		<script src="${ctx}/baseNew/other/js/bootbox.min.js" type="text/javascript"></script>
  		<link rel="stylesheet" href="${ctx}/baseNew/validator/css/bootstrapValidator.css"/>
		<script type="text/javascript" src="${ctx}/baseNew/validator/js/bootstrapValidator.js"></script>
		<script type="text/javascript" src="${ctx}/zenithsun/js/ModalUtil.js"></script>

		<!-- 公用的按钮函数 -->
		<script>
			var addUrl = "${ctx}/path/news/initnews";//表单列表add 的url地址
			var delUrl = "${ctx}/path/news/delnews";//表单列表del的url地址
			var viewUrl = "${ctx}/path/news/viewnews";//表单列表view的url地址
			var editUrl = "${ctx}/path/news/editnews";//表单列表edit的url地址
			var listUrl = "${ctx}/path/news/listnews";//表单列表list 的url地址,用来作为搜索地址
			var saveAddUrl = "${ctx}/path/news/addnews";//表单列表save的url地址
			var saveEditUrl = "${ctx}/path/news/modnews";//表单列表save的url地址
 			var treeNewsColumnsViewUrl = "${ctx}/path/newscolumns/treenewscolumns";//树形列表
 			var treeBasicDataViewUrl = "${ctx}/path/basicdata/treebasicdata";//树形列表
 			var imageUploadUrl = "${ctx}/path/image/imageupload";//图片上传的url地址
			function defaultEvent(eventType,width,height) {
				FormFunction.defaultEvent(eventType,width,height);//默认的处理函数，需自定义时自己写 在PublicFunction.js里
			}
		</script>
	</head>

	<body class="rightBody">
		<form name="searchForm" method="post" action="">
			<table width="100%" class="title" border="0" cellspacing="0" cellpadding="0">
				<tr>
					<th>
						<img src="${ctx}/base/images/public/titleicon.gif" width="16" height="16" alt="图标 " class="icon" />
						[新闻编辑-新闻列表]
					</th>
					<th width="200"></th>
				</tr>
				<tr>
					<td>
						<span class="fl ml5 lh200">搜索内容：</span>
						<input type="text" name="searchValue['title']" id="searchValue_'title'_" class="fl mr5 input"/>
						<input type="button" value="搜索" class="btnSo ml10" onclick="defaultEvent('search')" />
						<input name="" type="reset" value="重置" class="btn2 ml5" />
					</td>
					<td align="right">
						<input name="add" type="button" class="btn2" value="新增" onclick="FormFunction.showAddModal()" />
						<input name="del" type="button" class="btn2" value="删除" onclick="defaultEvent('del')" />
					</td>
				</tr>
			</table>
			<h:table>
				<h:column headerTitle="<input type='checkbox' name='slectAll' value='checkbox' onclick='selectAll(this.checked);'>" align="center" width="32">
					<input type="checkbox" name="selectedRow" value="${o.id }" />
				</h:column>
				
				<!-- generate code start -->

                <h:column headerTitle="ID">
                    ${o.id}
                </h:column>
                
                 <h:column headerTitle="新闻类型" width="75">
                 <c:if test="${o.type == 'pic'}" >图片新闻 </c:if>
                 <c:if test="${o.type == 'word'}" >文字新闻 </c:if>
                </h:column>

                <h:column headerTitle="所属栏目">
                     ${o.newsColumns.name}  
                </h:column>

                <h:column headerTitle="新闻分类">
                    ${o.newstype}
                </h:column>

                <h:column headerTitle="新闻标题">
                    ${o.title}
                </h:column>

                <h:column headerTitle="新闻内容">
                    ${o.content}
                </h:column>

                <h:column headerTitle="封面图片">
                   <c:if test="${o.coverPath != ''}" > 
                    <img style="width: 100px;height: 100px;" src="${ctx}/path/image/thumbnail/${o.coverPath}"    alt="${o.title}">
                    </c:if>
                </h:column>

                <h:column headerTitle="通讯员">
                    ${o.correspondent}
                </h:column>

                <h:column headerTitle="摄影师">
                    ${o.photographer}
                </h:column>

                <h:column headerTitle="编辑">
                    ${o.editor}
                </h:column>

                <h:column headerTitle="关键字">
                    ${o.keyword}
                </h:column>

                <h:column headerTitle="是否置顶">
         
				<c:choose>
				       <c:when test="${o.isTop == '0'}"> 否</c:when>
				       <c:when test="${o.isTop == '1'}"> 是  </c:when>
				       <c:otherwise> 母鸡  </c:otherwise>
				</c:choose>

                </h:column>

                <h:column headerTitle="是否醒目">
                    	<c:choose>
				       <c:when test="${o.isStriking == '0'}"> 否</c:when>
				       <c:when test="${o.isStriking == '1'}"> 是  </c:when>
				       <c:otherwise> 母鸡  </c:otherwise>
				</c:choose>
                </h:column>

                <h:column headerTitle="是否轮播">
                    	<c:choose>
				       <c:when test="${o.isCarousel == '0'}"> 否</c:when>
				       <c:when test="${o.isCarousel == '1'}"> 是  </c:when>
				       <c:otherwise> 母鸡  </c:otherwise>
				</c:choose>
                </h:column>
                                     
                <h:column headerTitle="发布时间">
                    ${o.publishTime}
                </h:column>
                
                     
                <h:column headerTitle="发布机构">
                    ${o.publishGroup}
                </h:column>

                <h:column headerTitle="开始展示时间" width="120" align="center">
                    <fmt:formatDate value="${o.showTime}" pattern="yyyy-MM-dd HH:mm:ss" />
                </h:column>
                
                 <h:column headerTitle="创建时间" width="120" align="center">
                    <fmt:formatDate value="${o.createTime}" pattern="yyyy-MM-dd HH:mm:ss" />
                </h:column>

				<!-- generate code end -->
				
				<h:column headerTitle="操作" width="80" align="center">
					<a href="javascript:FormFunction.showEditModal('${o.id }');" class="linkorange">修改</a>
					<a href="javascript:FormFunction.delSingle('${o.id }');" class="linkorange">删除</a>
				</h:column>
			</h:table>
			<table width="100%" class="pageDown" border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td align="right">
						<h:pager /> &nbsp;
					</td>
				</tr>
			</table>
		</form>
		<div id="myDlg"></div>
		<%@ include file="/base/jsp/common/CommonListFoot.jsp"%>
	</body>
</html>
